﻿<UserControl x:Class="Wallace.IDE.SalesForce.UI.ApexEditorControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"             
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>  
                
        <Border x:Name="borderNavigation"
                Grid.Row="0"
                Padding="3"
                Background="LightGray">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="3px" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                <ComboBox x:Name="comboBoxNavigationClass"
                          Grid.Column="0" 
                          IsEditable="False"
                          HorizontalAlignment="Stretch"
                          SelectionChanged="comboBoxNavigationClass_SelectionChanged" 
                          Template="{DynamicResource ChromeComboBoxControlTemplate}"/>
                <ComboBox x:Name="comboBoxNavigationMember"
                          Grid.Column="2"
                          IsEditable="False"
                          HorizontalAlignment="Stretch"
                          SelectionChanged="comboBoxNavigationMember_SelectionChanged"
                          Template="{DynamicResource ChromeComboBoxControlTemplate}"/>            
            </Grid>
        </Border>

        <avalonEdit:TextEditor x:Name="textEditor"
                               Grid.Row="1"
                               FontFamily="Consolas"
                               FontSize="10pt"
                               HorizontalScrollBarVisibility="Auto"
                               VerticalScrollBarVisibility="Visible"
                               ShowLineNumbers="True" 
                               TextChanged="textEditor_TextChanged"
                               KeyDown="textEditor_KeyDown"
                               UseLayoutRounding="True">
            <avalonEdit:TextEditor.Options>
                <avalonEdit:TextEditorOptions EnableHyperlinks="False" 
                                              EnableEmailHyperlinks="False" 
                                              AllowScrollBelowDocument="True" />
            </avalonEdit:TextEditor.Options>
        </avalonEdit:TextEditor>   

        <ScrollViewer x:Name="scrollViewerErrors"
                      Grid.Row="2"
                      MinHeight="75"
                      MaxHeight="75">
            <ListBox x:Name="listBoxErrors" />
        </ScrollViewer>

        <Button x:Name="buttonCloseErrors"
                Grid.Row="2"
                HorizontalAlignment="Right"
                VerticalAlignment="Top"
                Margin="0,2,21,0"
                Padding="0"
                BorderThickness="0"
                Click="buttonCloseErrors_Click">
            <Image Height="16" 
                   Width="16" 
                   Margin="0"
                   Source="/Resources/CloseAlt.png"/>
        </Button>
        
    </Grid>
</UserControl>
